package com.ulife.order.service.enumeration;

/**
 * Created by Ulife on 2015/12/30.
 */
public enum SaleOrderStatus {
    Created(1),
    Confirmed(2),
    Splited(3),
    Synchronized(4),
    Shipping(5),
    Rejected(6),//final
    Cancel(7),//final
    PartialCancel(8),
    Suspension(9),
    Finished(10);//final

    private int value = 1;

    private SaleOrderStatus(int value) {
        this.value = value;
    }

    public static SaleOrderStatus valueOf(int value){
        switch (value){
            case 1:return Created;
            case 2:return Confirmed;
            case 3:return Splited;
            case 4:return Synchronized;
            case 5:return Shipping;
            case 6:return Rejected;
            case 7:return Cancel;
            case 8:return PartialCancel;
            case 9:return Suspension;
            case 10:return Finished;
            default:return null;
        }
    }
    public int value(){
        return this.value;
    }
}